.components-page {
  header {
    box-shadow: 0 2px 8px #f0f1f2;
  }

  main {
    position: relative;
    min-width: 1200px;
    margin: 100px auto 15px;
    background-color: #fff;
    overflow: hidden;

    .main-container {
      min-height: 700px;
      margin: 0 60px 60px 340px;
      overflow: hidden;

      &.no-simulator {
        margin-right: 60px;

        .demo {
          margin-right: 0;
        }
      }

      .demo {
        margin-right: 415px;
      }
    }

    .simulator {
      position: absolute;
      top: 0;
      right: 60px;
      z-index: 10;

      iframe {
        box-sizing: content-box;
        background: #f6f6f6;
        border: 1px solid #eaeefb;
        width: 375px;
        height: 667px;
      }

      &__control {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        right: -30px;
        width: 30px;
        height: 30px;
        background: #f6f6f6;
        cursor: pointer;

        .za-icon {
          line-height: 1;
        }
      }

      &--affix {
        position: fixed;
        top: 100px;

        .simulator__control {
          color: red;
        }
      }
    }
  }
}

@media screen and (max-width: 768px) {
  .side-bar {
    display: none;
  }

  .components-page {
    main {
      min-width: 100%;

      .main-container {
        margin: 0 20px;

        &.no-simulator {
          margin-right: 20px;
        }

        .demo {
          margin-right: 0;
        }
      }

      .simulator {
        position: static;
        width: auto;
        text-align: center;
        margin-bottom: 40px;

        iframe {
          width: 320px;
          height: 568px;
        }
      }
    }

    footer {
      display: block;
      margin-left: 0;
    }
  }

  .za-back-to-top {
    right: 30px !important;
    bottom: 30px !important;
  }
}
